import { Injectable } from '@nestjs/common';
import * as crypto from 'crypto';
@Injectable()
export class CryptoService {
  /**
   * 加密
   */
  encrypto(data: string) {
    const hamc = crypto.createHmac('sha256', 'kylin');
    return hamc.update(data).digest('hex');
  }
}
